#pragma once

#include "../SGD Wrappers/CSGD_TextureManager.h"

#include <string>
#include <vector>
using namespace std;

class EmitterManager;
class ObjectManager;

struct EventPackage
{
	std::string name;
	std::vector<std::string> tags;
};

class LevelManager
{
	static unsigned int curLevel;		// An index to the current level loaded.
	unsigned int totalLevels;	// Stores how many levels that exist.

	std::vector<std::string> levelPaths;	// This vector contains the filepath of all levels that can be loaded.

	EmitterManager* emitterManager;		// A reference to the EmitterManager singleton.
	ObjectManager* objectManager;		// A reference to the ObjectManager singleton.

public:
	// Constructor
	LevelManager(void);

	// Destructor
	~LevelManager(void);

	void LoadLevel(unsigned int level);
	bool LoadNextLevel(void);

	// Accessors:
	unsigned int GetCurLevel(void) const { return curLevel; }

	// Mutators:
	void SetCurLevel(int n) {curLevel = n;}


private:// PRIVATE HELPERS

	void UnloadLevel(void);
	void CreateGameobject(std::string id, std::string tag, std::string data, RECT hitBox,
		std::vector<POINT>& waypoints, std::vector<EventPackage>& events);
};

